Skip to content

Conversation

@zhengkezhou1
Copy link

@zhengkezhou1 zhengkezhou1 commented May 10, 2025

Description

Stop using SpanAttributes in kafka.
Part of #3475

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Exist test

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@zhengkezhou1 zhengkezhou1 changed the title refactor: don't use deprecated SpanAttributes in kafka refactor: don't use deprecated SpanAttributes in confluent kafka May 10, 2025
@zhengkezhou1 zhengkezhou1 force-pushed the issues-3475-confluent-kafka branch from fa39299 to 92ec06e Compare May 10, 2025 16:18
span.set_attribute(SpanAttributes.MESSAGING_DESTINATION, topic)

span.set_attribute(MESSAGING_SYSTEM, "kafka")
span.set_attribute(MESSAGING_DESTINATION_NAME, topic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This task is about updating the import, not changing the semantic conventions so the attributes set should have the same value but imported from another path. If the attribute is not available we must keep using the one from SpanAttributes until we move to a newer semantic convention.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! take back deleted attribute value now.

Copy link
Contributor

@xrmx xrmx May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but still this changes messaging.destination to messaging.destination.name which we don't want to do.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, revert it.

@zhengkezhou1 zhengkezhou1 force-pushed the issues-3475-confluent-kafka branch from 92ec06e to 2f549fb Compare May 10, 2025 21:00
@xrmx xrmx moved this to Reviewed PR that needs fixing in @xrmx's Python PR digest May 19, 2025
span.set_attribute(SpanAttributes.MESSAGING_DESTINATION, topic)

if partition is not None:
span.set_attribute(SpanAttributes.MESSAGING_KAFKA_PARTITION, partition)
Copy link
Contributor

@xrmx xrmx May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed the attribute name here, it's not the only one and I won't add a comment for every one you changed.

@zhengkezhou1 zhengkezhou1 closed this by deleting the head repository Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Reviewed PRs that need fixes

Development

Successfully merging this pull request may close these issues.

3 participants